<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>后台管理</title>
  <meta name="renderer" content="webkit">
  <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <link rel="icon" href="javascript:;">
  <link rel="stylesheet" href="../../resource/layui/css/layui.css"  media="all">
</head>
<body>
    

    <div class="layui-collapse">
        <div class="layui-colla-item">
            <h2 class="layui-colla-title">
                <li class="layui-nav-item" style="width:75px">
                    <a href="javascropt:;">学生列表</a>
                </li>
            </h2>
            <div class="layui-colla-content layui-show" style="padding-top:0px">
                    <form class="layui-form" action="" style="padding-top:15px">
                            <div class="layui-form-item">
                                    <div class="layui-inline">
                                        <label class="layui-form-label">学号</label>
                                        <div class="layui-input-inline">
                                        <input type="text" id="iden" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">姓名</label>
                                        <div class="layui-input-inline">
                                        <input type="text" id="sname" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">宿舍</label>
                                        <div class="layui-input-inline">
                                        <input type="text" id="area" autocomplete="off" class="layui-input">
                                        </div>
                                    </div>
                                       
                                    <div class="layui-inline">
                                        <label class="layui-form-label">性别</label>
                                        <div class="layui-input-inline">
                                            <select id="gender">
                                                <option value="-1"> </option>
                                                <option value="1">男</option>
                                                <option value="2">女</option>
                                            </select>
                                            </div>
                                    </div>
                                    <div class="layui-inline">
                                        <label class="layui-form-label">使用权限</label>
                                        <div class="layui-input-inline">
                                            <select id="used">
                                                <option value="-1"> </option>
                                                <option value="1">是</option>
                                                <option value="0">否</option>
                                            </select>
                                        </div>
                                    </div>
                                    <div class="layui-inline">
                                            <label class="layui-form-label"> </label>
                                            <button type="button" class="layui-btn layui-btn-normal "onclick="submitBtn()">查询</button>
    
                                    </div>
                                </div>
                    </form>

                <table class="layui-hide" id="repair_table" lay-filter="test" style="width:80%;"></table>                
            </div>
        </div>
    </div>
    
      <script src="../../resource/layui/layui.js" charset="utf-8"></script>
      <!-- <script type="text/html" id="barDemo">
        <a class="layui-btn layui-btn-xs" lay-event="detail">详细</a>          -->
   <!-- <a class="layui-btn layui-btn-xs" lay-event="edit">编辑</a>
        <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a> -->
      <!-- </script>  -->
      <script type="text/html" id="barDemo">
        <a class="layui-btn layui-btn-xs" lay-event="detail">详细</a>
        {{#   if(d.isUsed == 1 ){  }}
            <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="change">禁用</a>
        {{#   } else {  }}
            <a class="layui-btn layui-btn-xs" lay-event="change">启用</a>
        {{#  } }} 
    </script>
      <script src="../../resource/jquery/dist/jquery.js"></script>
      <script src="../../resource/layui/layui.js" charset="utf-8"></script>
      <script src="../../resource/myResource/js/base.js"></script>
      <script src="../../resource/myResource/js/util/dictionary.js"></script>
      <script src="../../resource/myResource/js/student/student_list.js" charset="utf-8"></script>
    <script>
        layui.use(['form', 'layedit', 'laydate'], function(){});
        function submitBtn(){
            var iden = $("#iden").val().trim();
            var sname = $("#sname").val().trim();
            var area = $("#area").val().trim();
            var gender = $("#gender option:selected").attr('value');
            var used = $("#used option:selected").attr('value');
            var searchStr = "?";
            if(iden != null && iden != '')
                searchStr = searchStr+"iden="+iden+"&";
            if(sname != null && sname != '')
                searchStr = searchStr+"sName="+sname+"&";
            if(area != null && area != '')
                searchStr = searchStr+"studentAddr="+area+"&";
            if(gender != null && gender != -1)
                searchStr = searchStr+"gender="+gender+"&";
            if(used != null && used != -1)
                searchStr = searchStr+"isUsed="+used;
            // console.info(searchStr);
            search(searchStr);
        }
         //监听回车
         $("body").keydown(function(){
            if(event.keyCode == "13"){
                submitBtn();
            }
        })
    </script>
</body>
    
</html>